package net.dopan.pigframe.demo.service;

import net.dopan.pigframe.core.base.service.BaseService;
import net.dopan.pigframe.demo.model.entity.UserActivity;
import net.dopan.pigframe.demo.model.entity.vo.PublishNoteTagVo;
import net.dopan.pigframe.demo.model.entity.vo.UserNoteVo;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;
import java.util.Map;

@CacheConfig(cacheNames = "USERNOTESERVICE")
public interface UserNoteService extends BaseService<UserActivity> {

    /** 添加笔记标签 */
    Integer addUserNoteTag(PublishNoteTagVo publishNoteTagVo);
    List<Map<String,String>> getPublishNoteList(String tagName);
    /** 添加笔记@的好友*/
    Integer addUserNoteMentionUser(String userId,String noteId);
    Integer findUserNoteMaxId();
    /** 添加笔记用到的标签 */
    Integer addUserNoteTags(String noteId,String tagId);
    /** 发布笔记 */
    @CacheEvict(cacheNames = "USERCONCERNUSER",key = "'findUserNoteVoByUserId'+#userId")
    Integer addUserNote(UserNoteVo userNoteVo);
    /** 添加笔记照片 */
    Integer addUserNotePhoto(String noteId,String photoUrl);

}
